#ifndef PACKAGER_H
#define PACKAGER_H

#include <QObject>
#include <QStringList>
#include <QProcess>

class Packager : public QObject {
    Q_OBJECT
    
public:
    enum PackageFormat {
        WindowsInstaller,
        MacOSBundle,
        LinuxAppImage,
        PortableZip
    };
    
    explicit Packager(QObject *parent = nullptr);
    
    bool packageProject(const QString &projectPath, PackageFormat format);
    
signals:
    void progressChanged(int percent);
    void logMessage(const QString &message);
    void packagingFinished(bool success);
    
private:
    bool packageWindows(const QString &projectPath);
    bool packageMacOS(const QString &projectPath);
    bool packageLinux(const QString &projectPath);
    bool packagePortable(const QString &projectPath);
    
    QProcess *process;
};

#endif // PACKAGER_H